package com.HomeWork12.work2;

public class  Dragon extends Moster{
    public Dragon(String name, int blood, int MatkMax, int matkMin, int attkDragon) {
        super(name, blood, MatkMax, matkMin);
        this.attkDragon = attkDragon;
    }

    private int attkDragon=50;

    //int attack1 =  (int)(Math.random()*(this.atkmax-this.atkmin));
    //        System.out.println(this.profession +"本次产生的伤害值为:"+attack1);
//        int DragonBlood =dragon.getBlood();
//        DragonBlood=DragonBlood-attack1;
//        System.out.println("龙的剩余血量："+DragonBlood);
//        dragon.setBlood(DragonBlood);
    @Override
    public void attack(Player player) {
        System.out.println("龙攻击玩家");
        System.out.println(attkDragon);
        attkDragon =  (int)(Math.random()*(this.MatkMax-this.MatkMin)+this.MatkMin)+50;
        System.out.println(this.name+"本次伤害"+attkDragon);
        int playBlood= player.getPlayerBlood();
        playBlood=playBlood-attkDragon;
        System.out.println("玩家的剩余血量"+playBlood);
        player.setPlayerBlood(playBlood);
    }


}
